import service from "../utils/request";

// console.dir(service)
/**
 * @获取登入验证码
 *
 */
export let getCaptchaApi = () => service.get("/users/getCaptcha?v=next");

/**
 * @校验验证码
 */
export let verifyCaptchaApi = (captcha) =>service.get("/users/verifyCaptcha?captcha=" + captcha);

/**
 * @登入
 * /users/login
 * username
 * password
 * @手机验证码登入
 *
 */
export let loginApi = (username,password) => service.post("/users/login", {
    username,
    password
});
//获取手机验证码
export let loginSmsCodeApi = (phoneNumber) => service.post("/sms/send",{phoneNumber});
//手机验证码登入
export let loginSmsApi = (code) =>
  service.post("/users/login?type=sms", {
    code,
  });
